#include "stm32f10x.h"                  
#include "Delay.h"
#include "Servo.h"
#include "serial.h"
#include "OLED.h"
#include "Key.h"
#include "LED.h"
#include "Timer.h"
#include "PWM.h"
#include <stdlib.h>	
#include "MENU.h"

int main(void)
{	
	LED_Init();
    OLED_Init();
    OLED_Clear();
    Key_Init();
    serial_init();
	Servo_Init();
    PWM_Init();
	Timer_Init();
	USART_Cmd(USART1,ENABLE);
	int menu2;
	while(1)
	{    
		menu2 = menu1();
		if(menu2 ==1){menu3_Start();	}
		if(menu2 ==2){menu3_Stop();		}
		if(menu2 ==3){PID_restoration();}		
		if(menu2 ==4){}
		
	} 
}
